package com.zjw.zy.coreui.fragment.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.zjw.zy.R
import com.zjw.zy.bean.DailyWeather
import com.zjw.zy.base.BaseRecyclerAdapter
import com.zjw.zy.coreui.fragment.holder.Weather15Holder


/**
 * @author     ：zhong.jw
 * @date       ：Created in 2022/9/28 11:52
 * @description：15日天气适配器
 */
class Weather15Adapter(listener: ItemListener<Weather15Holder>) :
    BaseRecyclerAdapter<DailyWeather, Weather15Holder>(listener) {
    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): Weather15Holder {
        val itemView = LayoutInflater.from(parent.context)
            .inflate(R.layout.holder_weather15day_item, parent, false)

        return Weather15Holder(itemView)
    }

    override fun getItemCount(): Int {
        return data.size
    }
}